<?php
use \X;
use \X\Loader;
use \X\Controller\Front as FrontController;

// manual include of loader
require_once '../../lib/X/Loader.php';

/**
 * @todo turn this off after development
 * this tells the loader to trace class loading
 * for trouble shooting purposes
 */
Loader::isDebug(true);
/**/

// add the loader to the autoloader queue
Loader::registerAutoload();
// add the library to the search path
Loader::addIncludePath('../../lib/');
// set the application namespace for app specific code
FrontController::ApplicationNamespace('Seed');
// get a singelton instance of the front controller
$FrontController = FrontController::getInstance();
// --------------------------------------------  END BOOTSTRAP

/**
 * @todo turn this off after development
 * this allows errors through and loggs
 * the load route
 */
$FrontController->isDebug(true);
/**/

// respond to the current environment and return a printable response
$response = $FrontController->respond();
print $response;

/**
 * @todo turn this off after development
 * this shows the controler route
 */
print \X\Debug::out(\X\Logger\Memory::getInstance('router'));
print \X\Debug::out(\X\Logger\Memory::getInstance('loader'));
/**/

